package com.skyvin.nreceipts.common.document;

import java.util.Date;
import java.util.List;

import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

@Document
public class Receipt {

	private String id;
	private String name; 
	private Date receiptDate; 

	@DBRef
	private Retailer retailer;

	@DBRef
	private ReceiptCategory receiptCategory; 

	@DBRef 
	private ReceiptUpload receiptUpload;
	
	@DBRef
	private List<ReceiptItem> receiptItems;
	
	private String userPID;
	
	private double tax;
	
	private double total;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getReceiptDate() {
		return receiptDate;
	}

	public void setReceiptDate(Date receiptDate) {
		this.receiptDate = receiptDate;
	}

	public ReceiptUpload getReceiptUpload() {
		return receiptUpload;
	}

	public void setReceiptUpload(ReceiptUpload receiptUpload) {
		this.receiptUpload = receiptUpload;
	}

	public List<ReceiptItem> getReceiptItems() {
		return receiptItems;
	}

	public void setReceiptItems(List<ReceiptItem> receiptItems) {
		this.receiptItems = receiptItems;
	}
	
	public double getTax() {
		return tax;
	}

	public void setTax(double tax) {
		this.tax = tax;
	}

	public double getTotal() {
		return total;
	}

	public void setTotal(double total) {
		this.total = total;
	}
	
	public Retailer getRetailer() {
		return retailer;
	}

	public void setRetailer(Retailer retailer) {
		this.retailer = retailer;
	}

	public ReceiptCategory getReceiptCategory() {
		return receiptCategory;
	}

	public void setReceiptCategory(ReceiptCategory receiptCategory) {
		this.receiptCategory = receiptCategory;
	}
	
	

	public String getUserPID() {
		return userPID;
	}

	public void setUserPID(String userPID) {
		this.userPID = userPID;
	}

	@Override
	public String toString() {
		return "Receipt [id=" + id + ", name=" + name + ", receiptDate="
				+ receiptDate + ", userPID=" + userPID + ", tax=" + tax
				+ ", total=" + total + "]";
	}

	
}
